EjectDisk v1.0.1 by Jason Anderson, July-August 1994
About It
At heart, I’m a lazy person. If I have the choice of doing something using three key presses, or doing it using two key presses, I will use the two key presses every time (wouldn’t everyone?). Because I’m so lazy, I used to hate ejecting floppy disks. If I was typing at the keyboard, I had to pick up the mouse, click on the disk icon, and drag the disk icon to the trash. That's why I wrote EjectDisk. Now all I have to do is press a single key (on my extended keyboard), and any floppy disks that are currently mounted are unmounted and ejected.
EjectDisk comes in two parts, an extension (INIT), and an FKEY. You can choose between them which one to use, since both perform the same function (they are just started in slightly different ways). For example, I prefer using the extension, where as people who don’t like installing extensions might prefer to use the FKEY. This document describes the EjectDisk extension. For more information on the EjectDisk FKEY, select the About item from the Apple menu of the installer program.
The EjectDisk extension requires System 7 or later (it checks this at startup, and if you aren’t running System 7 or later it won’t install itself).
Installing the Extension
Simply drag the extension onto your System Folder, and release it. The computer will ask you if you want to put it in the Extensions folder. Click OK (or press return). Once you have restarted your computer, EjectDisk will be installed and ready for use!
Using the Extension
Once EjectDisk is installed, there are two ways of using it. If you have an extended keyboard, pressing the F15 key will cause EjectDisk to unmount and eject any floppy disks currently mounted. If you don’t have an extended keyboard, pressing command-escape will do the same thing.
The EjectDisk extension doesn’t mask out the key presses that are used to activate it, so any other extensions or programs that use either F15 or command-escape to activate should still work (of course, if you have any floppy disks in your computer they will be ejected).
Removing the Extension
If you later decide that you don’t want to keep EjectDisk, simply remove the extension from your extensions folder and restart.
Possible Problems
Sometimes, when you invoke EjectDisk (either the extension or the FKEY), the computer will beep and do nothing. This can mean one of two things: either you have a program that is currently running from a floppy disk, or a program currently running is accessing something on the floppy. Simply quit the offending program(s), and everything should work fine.
Disclaimer
THIS PROGRAM AND THE ACCOMPANYING DOCUMENTATION ARE PROVIDED “AS IS”. WHILE EVERY EFFORT HAS BEEN MADE TO TEST THIS SOFTWARE TO ENSURE IT PERFORMS AS EXPECTED, I (JASON ANDERSON) CAN NOT BE HELD RESPONSIBLE FOR ANY CONSEQUENTIAL, INCIDENTAL OR INDIRECT DAMAGES THROUGH THE USE OF THIS SOFTWARE.
Notes
Much of the code of the extension came from the source code supplied with Extension Shell, written by Dair Grant. EjectDisk was originally written using Extension Shell, but I had some problems, so I decided to code everything myself. While frustrating at times, doing it myself was very educational. I strongly recommend that you have a look at Extension Shell if you are at all interested in writing your own extensions.
The code used to show the icon at startup is called ShowIcon7 (available at most sumex and umich mirrors), and was written by James W. Walker.
Roundup
Well, that's all there is to say about EjectDisk. It has proven itself to be useful to me, and hopefully other people will think so too. If you have any comments, suggestions or (dare I say it) bug reports, I can be reached at:
Normal Mail:
Jason Anderson
PO Box 471
Devonport, TAS 7310
Australia
e-mail (Internet):
jason_ga@postoffice.sandybay.utas.edu.au
(could change after 1994)
Finally, while EjectDisk is distributed as freeware, I certainly won’t object if you wish to send me money for my creation ;-)
EjectDisk was written using THINK Pascal 4.0.2 and THINK C 5.0.4.
Version History
• v1.0.2 - Added a check to EjectDisk so that it didn’t do anything when a DA was the frontmost process (apparently this is a documented bug in System 7).
• v1.0.1 - Fixed a bug in the extension that caused incompatibilities with some extensions that loaded before EjectDisk (Apollo was one - thanks to Jean-Luc Haibette for finding this bug). Also fixed a bug with which any function key, not just F15, would cause EjectDisk to activate.